package com.day20170508.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/*
 * Created by root on 2017/5/8.
 */
@Controller
@RequestMapping(value = "/bbb")
public class Test02 {
    @RequestMapping(value = "/a")
    public String a(@RequestParam(value = "id",required = false)String id ){
        System.out.println("id================"+id);
        return "index";
    }
    @RequestMapping(value = "/b")
    public String b(@RequestParam(value = "id")String id ){
        System.out.println("id================"+id);
        return "index";
    }
    @RequestMapping(value = "/c")
    public String c(@RequestParam(value = "id",required = true)String id,@RequestParam(value = "age",required = false)String age ){
        System.out.println("id================"+id+";age=============="+age);
        return "index";
    }
}
